package com.tjetc.controller;

import com.tjetc.domain.RoomAddress;
import com.tjetc.service.RoomAddressService;
import com.tjetc.service.impl.RoomAddressServiceImpl;
import com.tjetc.vo.Result;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

/**
 * (room_address)表控制层
 *
 * @author xxxxx
 */
@RestController
@RequestMapping("/room_address")
public class RoomAddressController {
    /**
     * 服务对象
     */
    @Resource
    private RoomAddressService roomAddressService;

    /**
     * 通过主键查询单条数据
     *
     * @param id 主键
     * @return 单条数据
     */
    @GetMapping("selectOne")
    public RoomAddress selectOne(Integer id) {
        return roomAddressService.selectByPrimaryKey(id);
    }

    @GetMapping("selByClinicId")
    public Result selByClinicId(@RequestParam("cid") Integer cid) {
        return roomAddressService.selByClinicId(cid);
    }
}
